package juc.util;

import jdk.jdk8.localdate.LocalDateTimeUtils;

/**
 * @description:
 * @author: zk
 * @date: 2023-12-15
 */
public abstract class Log {
    private static final String pattern = "%s %s -- [%s] : %s";
    public static void info(String msg) {
        System.out.println(format("info",msg));
    }

    public static void err(String msg) {
        System.err.println(format("err",msg));
    }

    public static String format(String devel,String msg) {
        return String.format(pattern,LocalDateTimeUtils.nowStr(), devel, ThreadUtil.name(), msg);
    }

}
